<?php
namespace app\index\controller;


use app\index\controller\FrontBase;
use app\common\model\Tips as  TipsModel;
use think\Config;
use think\Request;
use app\common\model\Friend as FriendModel;

class About extends FrontBase
{

    public function index(){
        $friends = FriendModel::order('id desc')->paginate(8);
        $honors = TipsModel::order('id desc')->where('type','1')->select();
        $honors = collection($honors)->toArray();
        $honors = array_chunk($honors,3);

        $this->param['friends'] = $friends;
        $this->param['honors'] = $honors;

        return view('',$this->param);
    }

    public function about(){

        return view('',$this->param);
    }

    public function history(){

        $history = TipsModel::order('id desc')->where('type','2')->select();
        $this->param['history'] = $history;

        return view('',$this->param);
    }

    public function factory(){
	    	$factory = TipsModel::order('id desc')->where('type','6')->select();
	    	$this->param['factory'] = $factory;

        return view('',$this->param);
    }

    public function honors(){

        $honors = TipsModel::order('id desc')->where('type','1')->select();
        $this->param['honors'] = $honors;

        return view('',$this->param);
    }

    public function cooperation(){
        $friends = FriendModel::order('id desc')->select();

        $this->param['friends'] = $friends;
        return view('',$this->param);
    }
}












